package com.bacon.gmall.web;

import com.bacon.gmall.common.interceptor.FeignInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author： bacon、
 * @version： 1.0
 * @create： 2020-12-23 21:12
 * @description: 启动类
 */
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)//取消数据源自动配置
@ComponentScan({"com.bacon.gmall"})
@EnableDiscoveryClient
@EnableFeignClients(basePackages= {"com.bacon.gmall"})
public class WebAllApplication {


    //远程调用的拦截器引入到web-all微服务中
    @Bean
    public FeignInterceptor feignInterceptor(){
        return new FeignInterceptor();
    }

    public static void main(String[] args) {
        SpringApplication.run(WebAllApplication.class, args);
    }

}



